#custom errors for MAE parser

class MAError(Exception):
	"""Base exception class for MAETree"""
	pass
	
class StatsError(MAError):
	"""Invoked when a statistical formula is infelicitous for the given input"""
	def __init__(self, test):
		self.test = test
		
	def __str__(self):
		return self.test
		
class AnnotError(MAError):
	"""Invoked when specified annotator is infelicitous to build a subject list"""
	def __init__(self):
		pass
		
	def __str__(self):
		return "Insufficient annotators."
		
class GoldError(MAError):
	"""Invoked when no gold standards are specified to build a link list"""
	def __init__(self):
		pass
		
	def __str__(self):
		return "No gold standard specified."
